home *** CD-ROM | disk | FTP | other *** search
/ The Trig Explorer / The Trig Explorer.iso / mac / Explorer / SINE-PUZ.dxr / 00094.ls < prev    next >
Encoding:
Text File  |  1998-07-22  |  1.4 KB  |  40 lines

  1. on enterFrame
  2.   global S6, S7, S8, S9, S10, S11, AA, AB, AC, BA, BB, BC, CA, CB, CC, DA, DB, DC
  3.   set xA to the left of sprite 6 + 1
  4.   set yA to the bottom of sprite 6 - 48
  5.   set A1 to value(char 1 of S6 & "A")
  6.   set B1 to value(char 1 of S6 & "B")
  7.   set C1 to value(char 1 of S6 & "C")
  8.   set A2 to value(char 2 of S6 & "A")
  9.   set B2 to value(char 2 of S6 & "B")
  10.   set C2 to value(char 2 of S6 & "C")
  11.   set the trails of sprite 27 to 1
  12.   repeat with n = 1 to 89
  13.     set x to n * 2.0 * PI / 180.0
  14.     set x1 to (n * 2) + xA
  15.     set y1 to yA - ((18.0 * A1 * sin((B1 * x) + (C1 * PI / 180.0))) + (18.0 * A2 * sin((B2 * x) + (C2 * PI / 180.0))))
  16.     set the locH of sprite 27 to x1
  17.     set the locV of sprite 27 to y1
  18.     updateStage()
  19.   end repeat
  20.   set the trails of sprite 27 to 0
  21.   set xA to the left of sprite 7 + 1
  22.   set yA to the bottom of sprite 7 - 48
  23.   set A1 to value(char 1 of S7 & "A")
  24.   set B1 to value(char 1 of S7 & "B")
  25.   set C1 to value(char 1 of S7 & "C")
  26.   set A2 to value(char 2 of S7 & "A")
  27.   set B2 to value(char 2 of S7 & "B")
  28.   set C2 to value(char 2 of S7 & "C")
  29.   set the trails of sprite 28 to 1
  30.   repeat with n = 1 to 89
  31.     set x to n * 2.0 * PI / 180.0
  32.     set x1 to (n * 2) + xA
  33.     set y1 to yA - ((18.0 * A1 * sin((B1 * x) + (C1 * PI / 180.0))) + (18.0 * A2 * sin((B2 * x) + (C2 * PI / 180.0))))
  34.     set the locH of sprite 28 to x1
  35.     set the locV of sprite 28 to y1
  36.     updateStage()
  37.   end repeat
  38.   set the trails of sprite 28 to 0
  39. end
  40.